package d0313;

public class Abc {
    private String name="jerry";
    private int age =24;

//JDK8lambda表达式
    IFoo foo=()-> System.out.println("hello");

    AFoo afo=()-> 5;

    BFoo bfo=(c)-> 2*c;

    public static void main(String[] args) {
        Abc abc=new Abc();
        abc.foo.display();

        int x=abc.afo.get();
        System.out.println(x);

        System.out.println(abc.bfo.get1(2));
    }
}
interface IFoo{
    public void display();
}

interface AFoo{
   int get();
}

interface BFoo{
    int get1(int a);
}